package com.aipartner.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户收藏表
 *
 * @author AI Partner Team
 * @since 2024-01-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_favorites")
public class UserFavorite implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 收藏内容类型 (image, article, video, etc.)
     */
    @TableField("content_type")
    private String contentType;

    /**
     * 收藏内容ID
     */
    @TableField("content_id")
    private String contentId;

    /**
     * 收藏内容标题
     */
    @TableField("title")
    private String title;

    /**
     * 收藏内容描述
     */
    @TableField("description")
    private String description;

    /**
     * 收藏内容图片URL
     */
    @TableField("image_url")
    private String imageUrl;

    /**
     * 收藏内容详细信息(JSON格式)
     */
    @TableField("content_data")
    private String contentData;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField("is_deleted")
    private Boolean isDeleted;
}
